      SUBROUTINE VISCUS(ITEST,ZML,OMEG,OMEGDT,SYDOT,YDOT,MPRIME)
C
        IMPLICIT REAL*8 (A-H,O-Z)
C
C             'VISCUS' CALCULATES THE MOMENTS ACTING ON THE SATELLITE
C             HUB DUE TO THE VISCOUS RING NUTATION DAMPER.
C
      COMMON/CONSTS/ PI,TWOPI,RADIAN
C
      COMMON/OUTONE/ OMEGL,VSUBL,MSUBM(3),CMX,SIMPX,SB(3)
C
      COMMON/RVISCS/ NSUBX(3),YARRAY(3),RADTBE,VISCTY,RADRNG,DENSTY,
     .               JARRAY(3),SSUBY,OML1,ISUBD
C
C
      REAL*8 NSUBX,JARRAY,MPRIME(3),ISUBD,JAR(3),MSUBM
C
      DIMENSION ZML(7,7),OMEG(3),YDOT(3),OMEGDT(3),WB(3)
C
C
      IF(ITEST.EQ.2) GO TO 20
C
      DO 5 I=1,3
    5 WB(I)=OMEG(I)
C
      SYDOT=0.D0
      OMEGN=0.D0
C
      DO 10 I=1,3
      OMEGN=OMEGN + OMEG(I)*NSUBX(I)
   10 SYDOT=SYDOT + YARRAY(I)
C
      ASQR=RADTBE*RADTBE
C
      HVECTR=-SSUBY - ISUBD*OMEGN
      OMEGL=HVECTR/ISUBD
      VSUBL=OMEGL*RADRNG/12.D0
      OMEGL=OMEGL/RADIAN
C
C
C
      MPRIME(1)=NSUBX(1)*SYDOT -
     .         HVECTR*(WB(2)*NSUBX(3) - WB(3)*NSUBX(2))
C
C
      MPRIME(2)=NSUBX(2)*SYDOT -
     .         HVECTR*(WB(3)*NSUBX(1) - WB(1)*NSUBX(3))
C
C
      MPRIME(3)=NSUBX(3)*SYDOT -
     .         HVECTR*(WB(1)*NSUBX(2) - WB(2)*NSUBX(1))
C
C
C
      TSUBO=645.2D0*ASQR/VISCTY
C
      ZML(4,4)=ZML(4,4) - NSUBX(1)*NSUBX(1)*ISUBD
      ZML(4,5)=ZML(4,5) - NSUBX(1)*NSUBX(2)*ISUBD
      ZML(4,6)=ZML(4,6) - NSUBX(1)*NSUBX(3)*ISUBD
C
      ZML(5,4)=ZML(4,5)
      ZML(5,5)=ZML(5,5) - NSUBX(2)*NSUBX(2)*ISUBD
      ZML(5,6)=ZML(5,6) - NSUBX(2)*NSUBX(3)*ISUBD
C
      ZML(6,4)=ZML(4,6)
      ZML(6,5)=ZML(5,6)
      ZML(6,6)=ZML(6,6) - NSUBX(3)*NSUBX(3)*ISUBD
C
C
      RETURN
C
C
   20 DO 30 I=1,3
   30 JAR(I)=-(JARRAY(I)**2/TSUBO)*YARRAY(I)
C
      CONS=4.D0*ISUBD/TSUBO
C
C
      TEMP=0.D0
      DO 40 J=1,3
   40 TEMP=TEMP + NSUBX(J)*OMEGDT(J)
C
      DO 50 I=1,3
   50 YDOT(I)=JAR(I) - CONS*TEMP
C
      OMGDTN=0.D0
      DO 60 I=1,3
      MSUBM(I)=0.D0
   60 OMGDTN=OMGDTN + OMEGDT(I)*NSUBX(I)
C
      SUM=ISUBD*OMGDTN + SYDOT
C
C
C
      MSUBM(1)=NSUBX(1)*SUM -
     .         HVECTR*(WB(2)*NSUBX(3) - WB(3)*NSUBX(2))
C
      MSUBM(2)=NSUBX(2)*SUM -
     .         HVECTR*(WB(3)*NSUBX(1) - WB(1)*NSUBX(3))
C
      MSUBM(3)=NSUBX(3)*SUM -
     .         HVECTR*(WB(1)*NSUBX(2) - WB(2)*NSUBX(1))
C
C
C
      RETURN
      END
